import Home from '../pages/Home'
import {createBrowserRouter,Navigate } from 'react-router-dom'
import Main from '../pages/main'
import Mall from '../pages/Mall'
import User from '../pages/User'
import pageOne from '../pages/Other/pageOne'
import pageTwo from '../pages/Other/pageTwo'

const routes= [
    {
        path:'/',
        Component:Main,
        children:[
            {
                path:'/',
                element:<Navigate to="/home"></Navigate>
            },
            {
                path:'home',
                Component:Home
            },
            {
                path:'mall',
                Component:Mall
            },
            {
                path:'user',
                Component:User
            },
            {
                path:'other',
                children:[
                    {
                        path:'pageOne',
                        Component:pageOne
                    },
                    {
                        path:'pageTwo',
                        Component:pageTwo
                    }
                ]
            }
        ]
    },

]
export default routes